<?php
//ArticleModel
class ArticleModel extends Model {
	//添加文章
	public function insertArt($art) {
		//通过数组得到多个变量 extract(炸开)
		extract($art);
		//完善其他的数据
		$thumb = 'default.jpg';
		$addtime = time();
		//入库
		$sql = "insert into bg_article values(null,$cate_id, '$title', '$thumb', '$art_desc', '$content', '$author', default, $addtime, default)";
		return $this->dao->my_query($sql);
	}
}